package br.com.pocs.dao;

import java.util.ArrayList;
import java.util.List;

import br.com.caelum.vraptor.ioc.Component;
import br.com.pocs.model.Client;

@Component
public class ClientDao {
	
	private static List<Client> clients = new ArrayList<Client>();
	
	static {
		clients.add(new Client("Guilherme", "Gomes"));
		clients.add(new Client("Bruno", "Antonio"));
		clients.add(new Client("Bruno", "Cortonesi"));
	}

	public void save(Client custom) {
		clients.add(custom);
	}

	public List<Client> listAll() {
		return clients;
	}

	public Client load(Long id) {
		return clients.get(id.intValue());
	}

}
